<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * @property \Hyperf\Utils\HigherOrderTapProxy|mixed|void|null task_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|mixed|void|null received_cooperative_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|int|mixed|void|null cooperative_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|mixed|void|null admin_user_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|int|mixed|void|null user_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|int|mixed|void|null employer_id
 * @property \Hyperf\Utils\HigherOrderTapProxy|mixed|string|void|null phone
 * @property User user
 * @property Task task
 * @property Cooperative cooperative
 * @property Cooperative receivedCooperative
 * @property \Hyperf\Utils\HigherOrderTapProxy|mixed|void|null created_at
 * @property AdminUser adminUser
 */
class TaskPush extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'task_push';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [];

    public function task()
    {
        return $this->belongsTo(Task::class);
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function cooperative()
    {
        return $this->belongsTo(Cooperative::class);
    }

    public function receivedCooperative()
    {
        return $this->belongsTo(Cooperative::class, 'received_cooperative_id', 'id');
    }

    public function adminUser()
    {
        return $this->belongsTo(AdminUser::class);
    }

}